﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="addNews.aspx.cs" Inherits="MxWeiXinPF.Web.admin.wxRule.addNews" %>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <title>添加内容</title>
  
 <%=PageJSAndStype("edit").ToString() %>


    <script type="text/javascript">
        var api = top.dialog.get(window); //获取父窗体对象

        $(function () {

            //设置按钮及事件
            api.button([{
                value: '确定',
                callback: function () {
                    submitForm();
                   
                    setTimeout(function () {
                        
                    }, 2000);
                    return false;

                },
                autofocus: true
            }, {
                value: '取消',
                callback: function () { }
            }
            ]);

            //初始化表单验证
            $("#form1").initValidform();

            //初始化上传控件
            $(".upload-img").InitUploader({ filesize: "<%=siteConfig.imgsize %>", sendurl: "../../tools/upload_ajax.ashx", swf: "../../scripts/webuploader/uploader.swf", filetypes: "<%=siteConfig.fileextension %>" });



        });


        //提交表单处理
        function submitForm() {
   
            $("#btnSubmit").click();
        }

        

    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:HiddenField ID="hidrId" runat="server" Value="0" />
        <asp:HiddenField ID="hidId" runat="server" Value="0" />
        <asp:HiddenField ID="hidAction" runat="server" Value="0" />

       <div class="div-content">
            <dl>
                <dt>标题</dt>
                <dd>
                    <textarea name="txtTitle" rows="2" cols="20" id="txtTitle"  datatype="*2-50" class="input" runat="server"></textarea>
                    <span class="Validform_checktip">*</span>
                </dd>
            </dl>
            <dl>
                <dt>图片</dt>
                <dd>
                    <asp:TextBox ID="txtImgUrl" runat="server" CssClass="input normal upload-path" />
                    <div class="upload-box upload-img"></div>
                </dd>
            </dl>

            <dl>
                <dt>内容</dt>
                <dd>
                    <textarea name="txtContent" rows="2" cols="20" id="txtContent" class="input" runat="server"></textarea>
                    <span class="Validform_checktip"></span>
                </dd>
            </dl>
            <dl>
                <dt>链接</dt>
                <dd>
                    <textarea name="txtUrl" rows="2" cols="20" id="txtUrl" class="input" runat="server"></textarea>
                    <span class="Validform_checktip"></span>
                </dd>
            </dl>

            <dl>
                <dt>排序</dt>
                <dd>
                    <asp:TextBox ID="txtSortId" runat="server" CssClass="input small" datatype="n1-3" sucmsg=" ">1</asp:TextBox>
                    <span class="Validform_checktip">*数字，越小越向前</span>
                </dd>
            </dl>

        </div>
        <asp:Button ID="btnSubmit" runat="server" Text="提交保存"  style="display:none;"  OnClick="btnSubmit_Click" />


    </form>
</body>
</html>
